package com.ericsson.enap.modules.ossalarm.task.ims;

import com.ericsson.common.quartz.task.ManualTask;
import com.ericsson.common.util.LogFileName;
import com.ericsson.common.util.LoggerUtils;
import com.ericsson.enap.modules.ossalarm.service.OssFromNMSAlarmService;
import com.ericsson.enap.modules.sys.entity.EnipNetelement;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * ims NBI ry-vue指标处理
 */
@Component
public class OssFromNMSAlarmTask implements ManualTask {
    private Logger log = LoggerUtils.Logger(LogFileName.ImsOssAlarmJob);
    @Autowired
    private OssFromNMSAlarmService ossFromNMSAlarmService;
    @Override
    public void execute() {
        List<EnipNetelement> netElements=ossFromNMSAlarmService.queryNetelementList();
        ossFromNMSAlarmService.readAndDealAlarm(netElements,log);
    }
}
